/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.carpark.servicies;

import cz.muni.fi.pa165.carpark.EmployeePosition;
import cz.muni.fi.pa165.carpark.TO.EmployeeTO;
import java.util.List;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
/**
 *
 * @author tomas
 */
@WebService
public interface EmployeeService {
    
    /*
     * Creates new Employee entity in database
     * 
     * @param employee EmployeeDTO to create
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public void createEmp(@WebParam(name = "employee") EmployeeTO employee);
    
    /*
     * Retrieves EmployeeDTO from  database
     * 
     * @param id Id of retrieved Employee
     * @return EmployeeDTO 
     * @throws DataRetrievalFailureException in case some error od persistence layer.
     */
    public EmployeeTO retrieveEmp(@WebParam(name= "id") Long id);
    
    /*
     * Update entity Employee in database 
     * @param employee EmployeeDTO  to update
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public void updateEmp(@WebParam(name= "employee") EmployeeTO employee);
    
    /*
     * Delete Employee from database
     * @param employee to be deleted
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public void deleteEmp(@WebParam(name= "employee") EmployeeTO employee);
    
    /*
     * Return all EmployeeDTO stored in database
     * @return List<EmployeeDTO> List of all Employees.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public List<EmployeeTO> retrieveAll();
    
    /*
     * Return all EmployeeDTO stored in database with given position
     * @param position EmployeesPostion of returned Employees.
     * @return List<EmployeeDTO> List of all Employees with given position.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public List<EmployeeTO> retrieveByCategory(@WebParam(name= "position") EmployeePosition position);
}
